/**
 * 
 */
package com.fox.webapp.domain;

import org.bson.types.ObjectId;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * @author yockii
 *
 */
@Document
public class Bank {

	@Id
	private ObjectId id;
	
	private String bankName;
	private String bankNo;
	private String name;
	private String openBankName;
	
	
	
	/* (non-Javadoc)
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj) {
		if(obj instanceof Bank){
			Bank b = (Bank)obj;
			return b.id.equals(this.id) || (b.getBankName().equals(this.getBankName()) && b.getBankNo().equals(this.getBankNo()) && b.getName().equals(this.getName()));
		}
		return false;
	}
	/**
	 * @return the bankName
	 */
	public String getBankName() {
		return bankName;
	}
	/**
	 * @param bankName the bankName to set
	 */
	public void setBankName(String bankName) {
		this.bankName = bankName;
	}
	/**
	 * @return the bankNo
	 */
	public String getBankNo() {
		return bankNo;
	}
	/**
	 * @param bankNo the bankNo to set
	 */
	public void setBankNo(String bankNo) {
		this.bankNo = bankNo;
	}
	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}
	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}
	/**
	 * @return the id
	 */
	public ObjectId getId() {
		return id;
	}
	/**
	 * @param id the id to set
	 */
	public void setId(ObjectId id) {
		this.id = id;
	}
	/**
	 * @return the openBankName
	 */
	public String getOpenBankName() {
		return openBankName;
	}
	/**
	 * @param openBankName the openBankName to set
	 */
	public void setOpenBankName(String openBankName) {
		this.openBankName = openBankName;
	}
	
	
}
